package com.jic.member.api.rest;

import com.jic.common.base.vo.RestResult;
import com.jic.member.request.MememberUserForMarketRequest;
import com.jic.member.request.MememberUserRequest;
import com.jic.member.response.MememberUserResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "jic-member",path = "/api/user")
public interface MememberApi {

    @PostMapping("/saveMemberUserInfo")
    RestResult saveMemberUserInfo(MememberUserRequest mememberUserRequest);

    @PostMapping("/queryMemberUserInfo")
    RestResult<MememberUserResponse> queryMemberUserInfo(@RequestBody Long id);

    /**
     * 查询会员列表
     * 需要注意的是【mem_member_user】表中的dept_id是无效的；所以关联的【mem_member_action】表来锁定平台Id；
     * @param mememberUserRequest 请求入参
     * @return 返回封装的实体来
     * @author tzc
     * @date 2020-7-10 19:31:51
     */
    @PostMapping("/listMemberUserInfo")
    RestResult listMemberUserInfo(MememberUserRequest mememberUserRequest);

    @PostMapping("/updateMemberUserInfo")
    RestResult updateMemberUserInfo(MememberUserRequest mememberUserRequest);

    @PostMapping("/batchUpdateMemberUser")
    RestResult batchUpdateMemberUser(MememberUserRequest mememberUserRequest);


    /**
     * 为活动中心提供会员列表接口
     * @param request 请求参数
     * @return 响应参数
     * @author tzc
     * @date 2020-7-2 22:07:45
     */
    @PostMapping("/listMemberUserInfoForMarket")
    RestResult listMemberUserInfoForMarket(MememberUserForMarketRequest request);
}
